Package com.netscape.cmstools.profile
Class ProfileCLI
java.lang.Object
org.dogtagpki.cli.CLI
com.netscape.cmstools.profile.ProfileCLI
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic org.slf4j.Logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkConfiguration
(byte[] in, boolean requireProfileId, boolean requireDisabled) Sanity check the profile configuration.static void
static void
printProfile
(ProfileData data) static void
static ProfileData
readProfileFromFile
(String filename) static byte[]
readRawProfileFromFile
(String path) Reads a raw profile from the specified file.static byte[]
readRawProfileFromFile
(Path path) Reads a raw profile from the specified file.static void
saveEnrollmentTemplateToFile
(String filename, CertEnrollmentRequest request) static void
saveProfileToFile
(String filename, ProfileData data) Methods inherited from class org.dogtagpki.cli.CLI
addModule, addModule, execute, findModule, findModules, getClient, getClient, getConfig, getDescription, getFullModuleName, getModule, getModules, getName, getParent, getRoot, isDeprecated, printHelp, removeModule, runExternal, runExternal, setDescription, setName
-
Field Details
-
logger
public static org.slf4j.Logger logger -
caCLI
-
profileClient
-
-
Constructor Details
-
ProfileCLI
-
-
Method Details
-
getFullName
- Overrides:
getFullName
in classCLI
-
getManPage
- Overrides:
getManPage
in classCLI
-
getProfileClient
- Throws:
Exception
-
printProfileDataInfo
-
printProfile
-
saveProfileToFile
- Throws:
Exception
-
readProfileFromFile
- Throws:
Exception
-
readRawProfileFromFile
Reads a raw profile from the specified file.- Throws:
PKIException
- if it doesn't parse as a Properties or if it doesn't contain the profileId field.IOException
-
readRawProfileFromFile
Reads a raw profile from the specified file.- Throws:
PKIException
- if it doesn't parse as a Properties or if it doesn't contain the profileId field.IOException
-
checkConfiguration
public static void checkConfiguration(byte[] in, boolean requireProfileId, boolean requireDisabled) throws PKIException Sanity check the profile configuration. We are working with plain byte[] because java.util.Properties has undesirable (i.e. bug-causing) escaping behaviour (it inserts backslashes in places we don't want them). But we do still want to check that the input looks something like a profile configuration. So we use java.util.Properties to do that.- Throws:
PKIException
-
saveEnrollmentTemplateToFile
public static void saveEnrollmentTemplateToFile(String filename, CertEnrollmentRequest request) throws Exception - Throws:
Exception
-
printEnrollmentTemplate
-